You can help by commenting or suggesting your edit directly into the transcript. We'll review any changes before posting them. All comments are completely anonymous. For any comments that need a reply, consider emailing training@inductiveautomation.com.
Version:
LESSON LIST
-
5:37Timeseries Chart
-
3:03XY Chart
-
3:26Bar Chart
-
3:59Pie Chart
-
3:16Simple Table
-
3:22CrossTab Table
Take Topic Challenge
LESSON
Simple Table
Description
The Simple Table allows you create a table wtih a dynamic number of columns and rows based off the keys in your data source.
Video recorded using: Ignition 8.1
Resources
Transcript
(open in window)[00:00] Let's take a look at the simple table component. The simple table allows us to easily create a grid with either the rows or the columns being dynamic. Let's begin by taking the simple table and dropping it onto our report from the components section of the component palette. Like our other chart components, the simple table also has a data key. We need to specify a data source for it to use. So let's go to the key browser and we'll drag and drop Equipment_Downtime to the data key. Let's go to the data tab to see our Equipment_Downtime data source. You'll see I have two columns. The equipment column provides the name of the equipment for each occurrence of downtime, and the Duration_minutes column gives us the amount of time the machine was down in minutes. Let's go back to our design tab and select the simple table. Now, I'd like the simple table to show us each piece of equipment as well as the total amount of downtime occurrences and the average duration of each occurrence. To start we'll come up to our key browser. We'll take the equipment key and we'll drop it into the upper left hand cell.
[01:04] It's important to note that this top row is a header row. It's a special type of row, and you can see in the property inspector there is currently one header row. The header row is special in that the simple table will add a new column for each value in the equipment key. Just to show you what that looks like, let's look at the preview tab and you'll see each piece of equipment has its own column. We also have two blank columns here. That's because the simple table has two blank columns without any data keys. We can go ahead and remove those. I'll go back to the design tab and select the simple table, and then we can set our column property down to one, and now we're just left with the equipment column. And then let's get rid of that last row as well. So we'll set the row property to two. Next, let's add in our count key. Remember, for count to show up here, we need to set show calculations to true. We'll drag that to the second row, and then we'll expand our duration key. We'll take the average and we'll drop that on the bottom row. If we take a look at this in the preview tab, it looks about right. It would be nice if we had a header on the side here just to say what each of these bottom two rows represent.
[02:05] Let's do that next. We'll come back to the design tab and we'll select the simple table and we will come down to the header columns property. We'll set this to one. Let's put some text in here. We'll type DT Count into the first header, and then this one here we'll do DVG Duration. We can go ahead and format these a little bit too. If we select the cell, we get quite a number of available cell properties. Let's set the text to a red color here, and just to make this stand out a little bit more, let's add a gray background to the cell. We can do this by scrolling down to stroke and fill, which allows us to apply a fill color to the cell by setting the property to true. By default, it's already set at this light gray color. We'll do the same thing as well for our average duration cell. If we go back to the preview tab, we can see the table is better represented with those labels. However, it is starting to expand beyond our report. Let's go ahead and resize the table a bit. I'll go back to the design tab and select the simple table. We can use the arrow handles to squeeze that down.
[03:03] We'll go to the preview tab one last time and you'll see everything is looking good. So with the simple table component, you can very quickly add a table inside of your report.